package com.wanlian.netty.model;

import io.netty.channel.Channel;
import io.netty.channel.ChannelId;

/**
 * 持有连接
 *
 * @author ailianlu2
 */
public class Session {
    private ChannelId id;
    private Channel channel;
    private Address address;
    private String publicKey;

    public Session(Channel channel) {
        this.channel = channel;
    }

    public ChannelId getId() {
        return id;
    }

    public void setId(ChannelId id) {
        this.id = id;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }
}
